<?php /* Smarty version 2.6.26, created on 2012-09-20 20:11:58
         compiled from tmoncell_updatef1.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'tmoncell_updatef1.html', 266, false),array('function', 'html_options', 'tmoncell_updatef1.html', 398, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript" src="./assets/scripts//table.js"></script>
		<link rel="stylesheet" href="./assets/styles/cellgrid_back.css" type="text/css" />
		<style type="text/css">
		</style>
		<script type="text/javascript">
	    function rObj(a1, a2) {
	        this.a1 = a1;
	        this.a2 = a2;
	    }
	    function rObj(a1, a2) {
	        this.a1 = a1;
	        this.a2 = a2;
	    }
		var map_disp = new Array();
		<?php $_from = $this->_tpl_vars['title_map']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
		map_disp["<?php echo $this->_tpl_vars['kk']; ?>
"] = new rObj("<?php echo $this->_tpl_vars['vv'][0]; ?>
", "<?php echo $this->_tpl_vars['vv'][1]; ?>
" );
		<?php endforeach; endif; unset($_from); ?>
		
		var g_p_nums = new Array();
		<?php $_from = $this->_tpl_vars['pattern_nums']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
			g_p_nums["<?php echo $this->_tpl_vars['vv']['shop_cd']; ?>
_<?php echo $this->_tpl_vars['vv']['pattern_cd']; ?>
"] = <?php echo $this->_tpl_vars['vv']['nums']; ?>
;
		<?php endforeach; endif; unset($_from); ?>
		
		var sp_map =new Array();
		<?php $_from = $this->_tpl_vars['shopmapno']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
	sp_map["<?php echo $this->_tpl_vars['kk']; ?>
"] = [ '<?php echo $this->_tpl_vars['vv']['r']; ?>
', '<?php echo $this->_tpl_vars['vv']['i']; ?>
', '<?php echo $this->_tpl_vars['vv']['l1']; ?>
', '<?php echo $this->_tpl_vars['vv']['l2']; ?>
', '<?php echo $this->_tpl_vars['vv']['l3']; ?>
', '<?php echo $this->_tpl_vars['vv']['l4']; ?>
', '<?php echo $this->_tpl_vars['vv']['l5']; ?>
'  ];
		<?php endforeach; endif; unset($_from); ?>
		$(function() {
			$('.message').fadeIn("slow");
			//*******************
			$(".titlebase").live('change',function(){
				
				var id = $(this).attr("id") ;
				var index = id.split("_")[1] * 1 ;
				
				var shop_cd = $("#sp" + index).val() ; 
				var left_char = id.substr(0, 1) ;
				var vid = $(this).val();
				
				if  (left_char == "t") {
					if  ( !checkTitle(index) ){
						alert("通常と例外曜日のタイトル同時に入力不可です");
						 $(this).val("");
						return false;
					}
					$("#rgyu" + index).attr("value","");
					$("#irgyu" + index).attr("value","");
					$("#hirgyu" + index).attr("value","");
					var shop_map = "";
					
					if (map_disp[vid]!=null) {
						if (map_disp[vid].a1 == 1) {
							shop_map = sp_map[shop_cd][0];
						} else {
							shop_map = sp_map[shop_cd][1];
						}
						if  ( shop_map == "" ) {
							alert("マップNOは存在しないので、選択できできません。");
							$(this).val("");
							return false;
						}
						if (map_disp[vid].a1 == 1) {
							$("#rgyu" + index).attr("value", sp_map[shop_cd][0]);
						}
						if (map_disp[vid].a1 == 2) {
							$("#irgyu" + index).attr("value", sp_map[shop_cd][1]);
							$("#hirgyu" + index).attr("value", sp_map[shop_cd][1]);
						}
						
						if (map_disp[vid].a1 == 3) {
							$("#irgyu" + index).attr("value", map_disp[vid].a2);
							$("#hirgyu" + index).attr("value", sp_map[shop_cd][1]);
						}
					}
				}
				if  (left_char == "s") {
					var lIndex =  id.substr(1, 1);
					var lmapid = "#s"+ lIndex + index;
					if  ( vid == "" ) {
						$(lmapid).attr("value", "");
					} else {
						shop_map = sp_map[shop_cd][lIndex * 1 +1] ;
						if  ( shop_map == "" ) {
							alert("地域マップNOは存在しないので、選択できできません。");
							$(this).val("");
							return false;
						}
						$(lmapid).attr("value", shop_map);
					}
					
				}
				return "";
			});
			
			$(".spattern").live('change',function(){
				var val = $(this).val();
				var id = $(this).attr("id");
				var index = id.split("_")[2] * 1;
				theID = "n" + id;
				if (val == "" ) {
					$('#'+ theID ).val("");
				} else {
					var nums = getPNums($('#fm [name^=shop_cd]').eq(index).attr("value"),val) 
					$('#'+ theID ).val(nums);
				}
			});
			
			$('.btn_save').live('click',function(){
				if( confirm('更新してよろしいですか？') ){
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			
			$('a.tddel').live('click',function(){
				$('#rtr_' + $(this).attr("id") ).remove();
				$(this).closest('tr').remove();
			});
		});
		
		function checkTitle (index){
			var titleFlag = false;
			if  ( $("#tx_" +index).val() != "" ) {
				titleFlag = true;
			}
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
 			if  ( $("#t<?php echo $this->_tpl_vars['jj']; ?>
_" + index ).val() != "" ) {
				if (titleFlag) {
					return false;
				}
				titleFlag = true;
			}
<?php endforeach; endif; unset($_from); ?>
			return true;
		}
		function getPNums(shopcd,patterncd) {
			var vid =  shopcd + "_" + patterncd;
			if (vid in g_p_nums) {
				return g_p_nums[vid];
			}
			return "";
		}
	function hpa() {
		$("#pop_cp").hide();
		ginnerdiv = false;
	}
	function spa(val,text) {
		hpa();
		
		$("#"+gpatt_id).attr("value", text);
		var id  = gpatt_id.replace("nm", "")
		$("#" + id).attr("value", val);
		var index = id.split("_")[2] * 1;
		theID = "n" + id;
		var nums = "";
		if (val != "" ) {
			nums = getPNums($('#fm [name^=shop_cd]').eq(index).attr("value"),val) ;
		}
		
		$('#'+ theID ).val(nums);
		/*
		try{
			var group_no =  $("#"+gpatt_id).attr("ref") ;
			if (group_no) {
				 $("."+group_no).each(function(){
					   var patt_id =  $(this).attr("id") ;
					   $("#"+gpatt_id).attr("value", text);
				});
			}
		} catch(e) {
		 	
		}
		*/
	}
	var gpatt_id = null;
	var ginnerdiv = false;
	$(function(){
		$('.pnm').focus(function(){
			disppattern( $(this), "#pop_tp");
		});
		
		$('.pnq').focus(function(){
			disppattern( $(this), "#pop_qp");
		});
		
		document.onclick=function(e){ 
			var e=e?e:window.event; 
			var tar = e.srcElement||e.target; 
			if (!ginnerdiv) {
				if ( ( $(tar).attr("class") != "pnm") && ( $(tar).attr("class") != "pnq") ){ 
					hpa();
				} 
			}
		} 
	    $("#pop_cp").live("mouseenter",function(){
	    	ginnerdiv = true;
	    });
	    $("#pop_cp").live("mouseleave",function(){
	    	ginnerdiv = false
	    });
	});
	function disppattern(obj, val) {
		$('#pop_cp').html($(val).html() )
		var offset =  obj.offset();
		gpatt_id   =  obj.attr("id");
		var top = offset.top + obj.height() + 5 ;
		var bottom = document.body.scrollTop+document.body.clientHeight;
		if  (top + 350 >bottom) {
			top = bottom - 350;
		}
		var left  = offset.left + obj.width() - 380 ; 
		$('#pop_cp').css({
				'display':'block',
				'top': top +'px',
				'left':left+'px',
				'position':'absolute'
		});
	}
	
	function dorscroll(){
		document.getElementById('rdiv').scrollLeft=this.scrollLeft;
	}
		</script>
	</head>
<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>印刷手配管理</h2>
			<ul class="submenu clearfix">
				<li><a href="tmoncell_index.php">月間.セール明細情報一覧</a></li>
				<li><a href="tmoncell_form.php">月間.セール明細情報登録</a></li>
				<li>月間.セール明細情報更新</a></li>
				<li><a href="tmoncellprn_index.php">印刷部数明細</a></li>
				<li><a href="tmoncellshop_index.php">店舗実施一覧表</a></li>
			</ul>
			<h3>月間.セール明細情報更<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>完了<?php endif; ?></h3>
<?php if ($this->_tpl_vars['phase'] == 'input'): ?>
<p class="message">内容</p>
<form name="fm" id = "fm" action="tmoncell_updatef.php" method="post">
<p>	
	<b>週名 ： 
	<?php echo $this->_tpl_vars['forms']['year4']; ?>
年度 &nbsp; <?php echo $this->_tpl_vars['forms']['week_cd']; ?>
週目 <?php if ($this->_tpl_vars['forms']['week_seq']): ?>  &nbsp; <?php echo $this->_tpl_vars['forms']['week_seq']; ?>
回<?php endif; ?>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配布日 : <?php echo $this->_tpl_vars['forms']['flier_date']; ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 ステータス : <?php echo $this->_tpl_vars['forms']['status']; ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最終更新日時 :<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['u_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y/%m/%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y/%m/%d %H:%M")); ?>
</b>
	<input type="hidden" name="matrix_cd"  value="<?php echo $this->_tpl_vars['forms']['matrix_cd']; ?>
" />
	<input type="hidden" name="aja_cd"  value="<?php echo $this->_tpl_vars['forms']['aja_cd']; ?>
" />
	<input type="hidden" name="week_cd"    value="<?php echo $this->_tpl_vars['forms']['week_cd']; ?>
" />
	<input type="hidden" name="year4"      value="<?php echo $this->_tpl_vars['forms']['year4']; ?>
" />
	<input type="hidden" name="week_seq"   value="<?php echo $this->_tpl_vars['forms']['week_seq']; ?>
" />
	<input type="hidden" name="flier_date" value="<?php echo $this->_tpl_vars['forms']['status']; ?>
" />
	<input type="hidden" name="status" value="<?php echo $this->_tpl_vars['forms']['flier_date']; ?>
" />
	<input type="hidden" name="u_time"     value="<?php echo $this->_tpl_vars['forms']['u_time']; ?>
" />
	<?php if (( ! empty ( $this->_tpl_vars['edit_msg'] ) )): ?><div class="errmsg"><?php echo $this->_tpl_vars['edit_msg']; ?>
&nbsp;&nbsp; </div> <?php endif; ?><div class="errmsg"><?php echo $this->_tpl_vars['errmsg']; ?>
 </div>
</p>
 <table class="formTable" style="width:100%" >
 <tr><th colspan='3' >見込</th><th colspan='3'>計画</th><th colspan='3'>前年比</th></tr>
 <tr><td align="center">チラシ</td><td align="center">地域広告</td><td align="center">見込計</td>
 <td align="center">計画計</td><td align="center">計画差異</td><td align="center">計画比</td>
 <td align="center">前年計</td><td align="center">前年差異</td><td align="center">前年比</td></tr>
 <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
 </table><br>
 <div class="l_head_div" id ="lhdiv">
 <table class="formTable" id = "head_tab_l" style="table-layout:fixed;word-wrap:break-word;word-break:break-all;" >
 <tr><th style="width:130px;height:80px">店舗コード<br/>店舗名<br/>(ゾーンAJA)</th>
 <th style="width:60px">見込計<br>チラシ<br>地域広告</th>
 <th style="width:60px">計画計<br>計画差異<br>計画比</th>
 <th style="width:60px">前年計<br>前年差異<br>前年比 </th>
 <th style="width:28px"></th>
 <th style="width:70px">前年<br>売上高<br>実績</th>
 </tr>
 </table>
 </div>
 <div class="r_head_div" id ="rhdiv" onscroll="document.getElementById('rdiv').scrollLeft=this.scrollLeft;">
 <table class="formTable" id = "head_tab_r"  style="table-layout:fixed;word-wrap:break-word;word-break:break-all;width:3000px">

 <tr style="height:26px;">
 <th style="height:26px;width:684px" colspan="6" > 通常チラシ </th>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th  colspan="4" ><?php echo $this->_tpl_vars['cv']['name']; ?>
シ </th>
<?php endforeach; endif; unset($_from); ?> 
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
<th colspan="6" ><?php echo $this->_tpl_vars['cv']['name']; ?>
</th>
<?php endforeach; endif; unset($_from); ?>
 </tr>
 <tr style="height:26px;">
 <th rowspan="2" style="width:220px;">本年<br/>セールタイトル</th>
 <th rowspan="2"  style="width:28px;"></th>
 <th colspan="2" style="height:26px;width:218px">前年</th>
 <th colspan="2" style="height:26px;width:218px">本年</th>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th  rowspan="2" style="width:220px;">セールタイトル </th> <th style="width:28px;" rowspan="2"></th> <th  rowspan="2">本年<br>パターン </th><th rowspan="2">本年<br>部数</th>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th rowspan="2" style="width:220px;">本年<br/>セールタイトル</th> <th rowspan="2" style="width:28px;"></th>
 <th colspan="2" style="height:26px;">前年</th><th colspan="2">本年</th>
<?php endforeach; endif; unset($_from); ?>

 </tr>
 <tr  style="height:26px;">
 <th style="width:80px;height:26px;">部数</th>
 <th style="width:138px;">パターン</th> 
 <th style="width:80px;">部数</th>
 <th style="width:138px;">パターン</td>
 <?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
<td style="widtd:80px;height:26px;">部数</td><td style="widtd:138px;">パターン</td> <td style="widtd:80px;">部数</td><td style="widtd:138px;">パターン</td>
<?php endforeach; endif; unset($_from); ?>

 </tr>

	<!-- <tr>	<th style="height:80px;width:220px;">本年<br/>セールタイトル</th>
		<th style="width:28px;"></th><th style="width:80px;">前年チラシ部数</th><th>パターン</th>
		<th style="width:80px;">本年チラシ部数</th><th style="width:138px;">パターン</th>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:220px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
<br/>セールタイトル</th><th style="width:28px;"></th> <th style="width:80px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
<br/>チラシ部数</th><th style="width:138px;">パターン</th>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:220px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
<br/>セールタイトル</th><th style="width:28px;"></th><th style="width:80px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
</br>前年チラシ部数</th><th><?php echo $this->_tpl_vars['cv']['name']; ?>
<br/>前年<br/>パターン</th> <th style="width:80px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
<br/>チラシ部数</th><th  style="width:138px;">パターン</th>
  	<?php $_from = $this->_tpl_vars['cv']['weeks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cwsets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cwsets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['wck'] => $this->_tpl_vars['wcv']):
        $this->_foreach['cwsets']['iteration']++;
?>
		<th style="width:220px;"><?php echo $this->_tpl_vars['wcv']['name']; ?>
<br/>セールタイトル</th><th style="width:28px;"></th> <th style="width:80px;"><?php echo $this->_tpl_vars['wcv']['name']; ?>
<br/>チラシ部数</th><th>パターン</th>
	<?php endforeach; endif; unset($_from); ?>
<?php endforeach; endif; unset($_from); ?>
		</tr>
-->
	</table>
 </div>
 <div class="l_div" id="ldiv" onscroll="document.getElementById('rdiv').scrollTop=this.scrollTop;"> 
 <table class="formTable" id = "1_tab_l" style="table-layout:fixed;word-wrap:break-word;word-break:break-all;" >
 <tr style="height:1px;">
 <th style="width:130px;height:1px"></th>
 <th style="width:60px"></th>
 <th style="width:60px"></th>
 <th style="width:60px"></th>
 <th style="width:28px"></th>
 <th style="width:70px"></th>
 </tr>
 <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
 <?php $this->assign('i', ($this->_foreach['member']['iteration']-1)); ?>
  <tr>
	<td rowspan=3> 
	<input type="text" id="sp<?php echo $this->_tpl_vars['i']; ?>
"  name="shop_cd[]"     class="dtext" value="<?php echo $this->_tpl_vars['vv']['shop_cd']; ?>
" readonly/></br>
	<input type="text" name="shop_name[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['shop_name']; ?>
" readonly/></br>
	<input type="text"  name="user_name[]" class="dtext" value="<?php echo $this->_tpl_vars['vv']['user_name']; ?>
" readonly/>
	</td>
	<td rowspan=3> <input type="text"  id="rgyu<?php echo $this->_tpl_vars['i']; ?>
" name="rgyu[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['rgyu']; ?>
" readonly/></td>
	<td rowspan=3> <input type="text" id="irgyu<?php echo $this->_tpl_vars['i']; ?>
" name="irgyu[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['irgyu']; ?>
" readonly/>
	<input type="hidden"   id="hirgyu<?php echo $this->_tpl_vars['i']; ?>
"  name="hirgyu[]"  id="hirgyu<?php echo $this->_tpl_vars['i']; ?>
"  value="<?php echo $this->_tpl_vars['vv']['hirgyu']; ?>
" /></td>
	
	<td rowspan=3> <input type="text" id="s1<?php echo $this->_tpl_vars['i']; ?>
"  name="lnews1[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnews1']; ?>
" readonly/></td>
	<td align=center>土</td><td><input type="text"  name="ly_sale6[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale6']; ?>
" readonly/></td>

	</tr><tr><td align=center>日</td><td><input type="text"  name="ly_sale7[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale7']; ?>
" readonly/></td></tr>
	<tr><td align=center>計</td><td><input type="text"  name="ly_sale[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale']; ?>
" readonly/></td></tr>
<?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
<div class="r_div" id="rdiv" onscroll="document.getElementById('rhdiv').scrollLeft=this.scrollLeft;document.getElementById('ldiv').scrollTop=this.scrollTop;hpa();"> 
	<table class="formTable" id = "1_tab_r"  style="table-layout:fixed;word-wrap:break-word;word-break:break-all;width:3000px">
	<tr style="height:1px;">
		<th style="height:1px;width:220px;"></th>
		<th style="width:28px;"></th><th style="width:80px;"></th><th></th>
		<th style="width:80px;"></th><th style="width:138px;"></th>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:220px;"></th><th style="width:28px;"></th><th style="width:80px;"></th><th style="width:138px;"></th>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:220px;"></th><th style="width:28px;"></th><th style="width:80px;"></th><th></th> <th style="width:80px;"></th><th style="width:138px;"></th>
	<?php $_from = $this->_tpl_vars['cv']['weeks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cwsets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cwsets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['wck'] => $this->_tpl_vars['wcv']):
        $this->_foreach['cwsets']['iteration']++;
?>
		<th style="width:220px;"></th><th style="width:28px;"></th><th style="width:80px;"></th><th> style="width:138px;"</th>
	<?php endforeach; endif; unset($_from); ?>
<?php endforeach; endif; unset($_from); ?>
		</tr>
<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
 <?php $this->assign('i', ($this->_foreach['member']['iteration']-1)); ?>
	<tr>
	<td rowspan='3'><input type="text"  name="ltitle_cd[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['ltitle_cd']; ?>
" readonly/><br>
	<select  id="tx_<?php echo $this->_tpl_vars['i']; ?>
" name="title_cd[]" class="titlebase"  > <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['title'],'selected' => $this->_tpl_vars['vv']['title_cd']), $this);?>
</select></td>
	<td align=center>B2</td>
	<td><input type="text"  name="lnpc_b2[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b2']; ?>
" readonly/></td>
	<td><input type="text"  name="lpc_b2[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b2']; ?>
" readonly/></td>
	<td><input type="text"  id="npc_b2_<?php echo $this->_tpl_vars['i']; ?>
"    name="npc_b2[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv']['npc_b2']; ?>
" /></td>
	<td><input type="text"  id="nmpc_b2_<?php echo $this->_tpl_vars['i']; ?>
"  <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="z<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>  name="nmpc_b2[]" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="z<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php else: ?> class="pnm" <?php endif; ?>  value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b2']]; ?>
" readonly/>
	<input type="hidden"  id="pc_b2_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b2[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b2']; ?>
" /></td>

<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
		<td rowspan='3'> <select  id="t<?php echo $this->_tpl_vars['jj']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['title_cd']; ?>
[]" class="titlebase" ><?php echo smarty_function_html_options(array('name' => '','options' => $this->_tpl_vars['title_week'],'selected' => $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['title_cd']]), $this);?>
</select></td>	
		<td align=center>B2</td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b2']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b2']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"   class="pnm" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
			
		<td rowspan='3'><input type="text"  name="<?php echo $this->_tpl_vars['cv']['ltitle_cd']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['ltitle_cd']]; ?>
" readonly/><br>
		 <select id="s<?php echo $this->_tpl_vars['ck']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['title_cd']; ?>
[]" class="titlebase" ><?php echo smarty_function_html_options(array('name' => '','options' => $this->_tpl_vars['title'],'selected' => $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['title_cd']]), $this);?>
</select></td>	
		<td align=center>B2</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b2']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b2']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b2']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b2']]; ?>
"  readonly /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b2']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b2']]); ?>
		 <td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"   class="pnq" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"   id="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>
<?php endforeach; endif; unset($_from); ?>
	</tr>
	<tr>
		
		<td align=center>B3</td>
		<td><input type="text"  name="lnpc_b3[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b3']; ?>
" readonly/></td>
		<td><input type="text"  name="lpc_b3[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b3']; ?>
" readonly/></td>
		<td><input type="text"  id="npc_b3_<?php echo $this->_tpl_vars['i']; ?>
" name="npc_b3[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv']['npc_b3']; ?>
" /></td>
		<td><input type="text"    id="nmpc_b3_<?php echo $this->_tpl_vars['i']; ?>
" name="nmpc_b3[]"   class="pnm" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b3']]; ?>
" readonly/>
		<input type="hidden"  id="pc_b3_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b3[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b3']; ?>
" /></td>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B3</td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b3']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b3']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"   class="pnm" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>
 <?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B3</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b3']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b3']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b3']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b3']]; ?>
"  readonly /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b3']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b3']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"   class="pnq" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>

<?php endforeach; endif; unset($_from); ?>
	</tr>
		<tr>
		
		<td align=center>B4</td>
		<td><input type="text"  name="lnpc_b4[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b4']; ?>
" readonly/></td>
		<td><input type="text"  name="lpc_b4[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b4']; ?>
" readonly/></td>
		<td><input type="text"  id="npc_b4_<?php echo $this->_tpl_vars['i']; ?>
" name="npc_b4[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv']['npc_b4']; ?>
" /></td>
		<td><input type="text"    id="nmpc_b4_<?php echo $this->_tpl_vars['i']; ?>
" name="nmpc_b4[]"   class="pnm" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b4']]; ?>
" />
		<input type="hidden"  id="pc_b4_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b4[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b4']; ?>
" /></td>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B4</td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b4']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b4']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"   class="pnm" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>
 <?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B4</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b4']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b4']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b4']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b4']]; ?>
"  readonly /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
[]"   class="celltext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b4']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b4']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"   class="pnq" value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" /></td>

<?php endforeach; endif; unset($_from); ?>
	</tr>
<?php endforeach; endif; unset($_from); ?>
	</table>
</div>
<div class = "all_div">
	<p  class="button" >
		<button type="button" class="btn_save"  class="submit btnleft"><span>更新</span></button>
	</p>
	<input type="hidden" name="mode" value="" />
</div>
</form>
<?php endif; ?>

<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>
	<p class="message"><?php echo $this->_tpl_vars['message']; ?>
</p>
	<ul>
		<li>>> <a href="tmoncell_index.php?hist=2">一覧ページに戻る</a></li>
		<li>>> <a href="tmoncell_formf.php?mm=<?php echo $this->_tpl_vars['forms']['map_no']; ?>
&ww=<?php echo $this->_tpl_vars['forms']['matrix_cd']; ?>
">更新</a></li>
	</ul>
<?php endif; ?>
		</div>
		</div>
 <div id="pop_cp" style = "width:380px; height:300px;background:#eeeecc;  overflow-y:scroll;display:none" > </div>
   <div id="pop_tp" style = "display:none" >
 <table width="98%" border="0" cellspacing="2" cellpadding="0" style="font-size:12px; line-height:17px;">
  <tr><td align="right" colspan=4><button type="button" onclick="javascript:spa('','')" ><span>クリア</span></button>&nbsp;&nbsp;</td></tr>
 <?php $_from = $this->_tpl_vars['allpattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cs'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cs']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['cs']['iteration']++;
?>
 <?php if (( $this->_tpl_vars['k'] == 1 ) || ( $this->_tpl_vars['k'] == 2 ) || ( $this->_tpl_vars['k'] == 5 )): ?> 
 <tr><td align="left"><b><?php echo $this->_tpl_vars['patternflags'][$this->_tpl_vars['k']]; ?>
</b></td></tr>
 <tr>
	 <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['pk'] => $this->_tpl_vars['pv']):
        $this->_foreach['csets']['iteration']++;
?>
	 	<td align="left">
	  <a href="javascript:void(0)" onclick="javascript:spa('<?php echo $this->_tpl_vars['pk']; ?>
','<?php echo $this->_tpl_vars['pv']; ?>
')" > <?php echo $this->_tpl_vars['pv']; ?>
 </a>
	   </td>
	    <?php if (($this->_foreach['csets']['iteration']-1) % 4 == 3): ?></tr><tr><?php endif; ?>
	 <?php endforeach; endif; unset($_from); ?>
  <?php endif; ?>
 <?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
  <div id="pop_qp"  style = "display:none" >
 <table width="98%" border="0" cellspacing="2" cellpadding="0" style="font-size:12px; line-height:17px;">
  <tr><td align="right" colspan=4><button type="button" onclick="javascript:spa('','')" ><span>クリア</span></button>&nbsp;&nbsp;</td></tr>
 <?php $_from = $this->_tpl_vars['allpattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cs'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cs']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['cs']['iteration']++;
?>
 <?php if (( $this->_tpl_vars['k'] == 2 ) || ( $this->_tpl_vars['k'] == 3 ) || ( $this->_tpl_vars['k'] == 4 )): ?> 
 <tr><td align="left"><b><?php echo $this->_tpl_vars['patternflags'][$this->_tpl_vars['k']]; ?>
</b></td></tr>
 <tr>
	 <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['pk'] => $this->_tpl_vars['pv']):
        $this->_foreach['csets']['iteration']++;
?>
	 	<td align="left">
	  <a href="javascript:void(0)" onclick="javascript:spa('<?php echo $this->_tpl_vars['pk']; ?>
','<?php echo $this->_tpl_vars['pv']; ?>
')" > <?php echo $this->_tpl_vars['pv']; ?>
 </a>
	   </td>
	    <?php if (($this->_foreach['csets']['iteration']-1) % 4 == 3): ?></tr><tr><?php endif; ?>
	 <?php endforeach; endif; unset($_from); ?>
  <?php endif; ?>
 <?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
<div class = "all_div" ><?php echo $this->_tpl_vars['footer']; ?>
</div>
	</body>
</html>